<div>
    <div class="wrapper">
        <toptitle toptitletext='我的夺宝记录'></toptitle>
        <div class="m_buylist_nav" id="navBox">
            <div class="m_buylist_nav-div">
                <div class="m_buylist_nav-btn hover" ng-click="navclick('all')">全部<em></em></div>
                <div class="m_buylist_nav-btn" ng-click="navclick('ing')">进行中<em></em></div>
                <div class="m_buylist_nav-btn" ng-click="navclick('end')">已结束<em></em></div>
                <div class="m_buylist_nav-btn" ng-click="navclick('myluck')">中奖<em></em></div>
                <div class="clear"></div>
            </div>
        </div>
        <div ng-show="isdatashow" class="shoplistnone">
            <img src="images/none.png" alt=""><br>
            快去夺宝吧~
            <p>订单里没有东西啦</p>
        </div>
        <div ng-hide="isdatashow">
        <div class="m_buylist marginB" ng-hide="isbothhide">
            <div  ng-repeat="x in data.unitary track by $index">
            <ul>
                <li class="in_progress" ng-if="x.is_luck == 0 && x.state == 1">
                        <cite ng-click="go(x.id, 'ing')"><img src="{{x.logopic}}"><i>进行中</i></cite>
                        <dl>
                            <dt ng-click="go(x.id, 'ing')">{{x.name}}</dt>
                            <dd>已参与<em class="orange">{{x.count}}</em>人次</dd>
                            <dd>
                                <div class="gRate">
                                    <div class="Progress-bar">
                                        <p class="u-progress"><span style="width:{{ x.proportion }}%;" class="pgbar"><span class="pging"></span></span></p>
                                        <ul class="Pro-bar-li">
                                            <li class="P-bar01"><em>{{x.pay_count}}</em>共参与</li>
                                            <li class="P-bar02"><em>{{x.total_num}}</em>总需人次</li>
                                            <li class="P-bar03"><em>{{x.total_num - x.pay_count}}</em>剩余</li>
                                            <li class="clear"></li>
                                        </ul>
                                    </div>
                                </div>
                            </dd>
                        </dl>
                </li>
                <li  class="margintop" ng-if="x.is_luck == 0 && x.state == 2">
                    <div>
                        <cite ng-click="go(x.id, 'end')">
                            <img src="{{x.logopic}}">
                            <i>已结束</i>
                        </cite>
                        <dl>
                            <dt>
                                <a ng-click="go(x.id, 'end')" href="javascript:;" class="gray6">{{x.name}}</a>
                            </dt>
                            <dd>获得者：<a href="" class="blue">{{x.user_name}}</a></dd>
                            <dd>揭晓时间：<em>{{x.endtime * 1000 |  date : 'yyyy-MM-dd HH:mm:ss'}}</em></dd>
                        </dl>
                    </div>
                </li>
                <li class="margintop" ng-if="x.is_luck == 1 && x.state == 2">
                        <cite ng-click="go(x.id,'end')">
                            <img src="{{x.logopic}}">
                            <i style="background: red;">已中奖</i>
                        </cite>
                        <dl>
                            <dt ng-click="go(x.id,'end')">
                                <span class="gray6">{{x.name}}</span>
                            </dt>
                            <dd>幸运号：<a href="" class="blue">{{x.lucknum}}</a> &nbsp; <a href="{{x.order_url}}">查看订单</a></dd>
                            <dd>揭晓时间：<em>{{x.endtime * 1000 |  date : 'yyyy-MM-dd HH:mm:ss'}}</em></dd>
                        </dl>
                </li>
                <li class="margintop"  ng-if="x.state == 3">
                    <div>
                    <cite ng-click="go(x.id,'end')">
                        <img src="{{x.logopic}}">
                        <i style="background: red;">未揭晓</i>
                    </cite>
                    <dl>
                        <dt ng-click="go(x.id,'end')">
                            <span class="gray6">{{x.name}}</span>
                        </dt>
                        <dd>幸运号：<a href="" class="blue">等待揭晓</a></dd>
                        <dd>揭晓时间：<em>{{x.endtime * 1000 |  date : 'yyyy-MM-dd HH:mm:ss'}}</em></dd>
                    </dl>
                    </div>
                </li>
            </ul>
            </div>
        </div>
        <div class="m_buylist marginB" ng-show="isingshow">
            <ul>
                <li class="in_progress" ng-repeat="x in data.unitary track by $index">
                        <cite ng-click="go(x.id, 'ing')"><img src="{{x.logopic}}"><i>进行中</i></cite>
                        <dl>
                            <dt ng-click="go(x.id, 'ing')">{{x.name}}</dt>
                            <dd>已参与<em class="orange">{{x.count}}</em>人次</dd>
                            <dd>
                                <div class="gRate">
                                    <div class="Progress-bar">
                                        <p class="u-progress"><span style="width:{{x.proportion}}%;" class="pgbar"><span class="pging"></span></span></p>
                                        <ul class="Pro-bar-li">
                                            <li class="P-bar01"><em>{{x.pay_count}}</em>共参与</li>
                                            <li class="P-bar02"><em>{{x.total_num}}</em>总需人次</li>
                                            <li class="P-bar03"><em>{{x.total_num - x.pay_count}}</em>剩余</li>
                                        </ul>
                                    </div>
                                </div>
                            </dd>
                        </dl>
                </li>
            </ul>
        </div>
        <div class="m_buylist marginB" ng-show="isendshow">
            <ul>
                <li class="margintop" ng-repeat="x in data.unitary track by $index">
                    <div ng-if="x.state == 2">
                        <cite ng-click="go(x.id,'end')">
                            <img src="{{x.logopic}}">
                            <i>已结束</i>
                        </cite>
                        <dl>
                            <dt ng-click="go(x.id,'end')">
                                <a href="javascript:;" class="gray6">{{x.name}}</a>
                            </dt>
                            <dd>获得者：<a href="" class="blue">{{x.user_name}}</a></dd>
                            <dd>揭晓时间：<em>{{ x.addtime * 1000 |  date : 'yyyy-MM-dd HH:mm:ss' }}</em></dd>
                        </dl>
                    </div>

                    <div ng-if="x.state == 3">
                        <cite ng-click="go(x.id,'end')">
                            <img src="{{x.logopic}}">
                            <i style="background: red;">未揭晓</i>
                        </cite>
                        <dl>
                            <dt ng-click="go(x.id,'end')">
                                <span class="gray6">{{x.name}}</span>
                            </dt>
                            <dd>幸运号：<a href="" class="blue">等待揭晓</a></dd>
                            <dd>揭晓时间：<em>{{ x.endtime * 1000 |  date : 'yyyy-MM-dd HH:mm:ss'}}</em></dd>
                        </dl>
                    </div>
                </li>

            </ul>
        </div>


        <div class="m_buylist marginB" ng-show="isokshow">
            <ul>
                <li ng-repeat="x in data.unitary track by $index">
                        <cite ng-click="go(x.id,'end')">
                            <img src="{{x.logopic}}">
                            <i style="background: red;">已中奖</i>
                        </cite>
                        <dl>
                            <dt ng-click="go(x.id,'end')">
                                <span class="gray6">{{x.name}}</span>
                            </dt>
                            <dd style="margin-top: 10px">幸运号：<a href="" class="blue">{{x.lucknum}}</a> &nbsp; <a href="{{x.order_url}}">查看订单</a></dd>
                            <dd style="margin-top: 10px">揭晓时间：<em>{{ x.addtime * 1000 |  date : 'yyyy-MM-dd HH:mm:ss'}}</em></dd>
                        </dl>
                </li>
            </ul>
        </div>
    </div>
    </div>
</div>
<div class="load_more" ng-show="isloadmore">
    正在加载中...
</div>

<div class="orderend-count" ng-show="orderendCountisshow" >
    <div class="orderend-count-bj" ng-click="orderendCountisshow = false;"></div>
    <div class="orderend-count-con">
        <div class="orderend-tit">计算方法</div>
        <p>1. 活动开始以后，当活动最后一人次被购买，此时活动就会进入开奖环节</p>
        <p>2. 幸运号是取最后一人次的购买者之前的100条全站购买记录（是指全站的所有订单）</p>
        <p>3. 将前100条记录的时间转化成数据（例如21:45:32.123转化后就是214532123）的总和</p>
        <p>4. 用算出的总和与活动的最大参与人次取余数</p>
        <p>5. 余数加上100000组成最终的幸运号码</p>
        <p>6. 当全站记录没有100条时，则有多少取多少记录来计算</p>
    </div>
</div>

<shop-footer whoshow="3"></shop-footer>
<dialog isdialogshow="isdialogshow" dialogtext="{{dialogtext}}"></dialog>
<loading loadisshow="ctrlisloadshow"></loading>